-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
readme #8274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Monisha-official
wants to merge
1
commit into
AppFlowy-IO:main
Choose a base branch
from
Monisha-official:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
readme #8274
+105
−157
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reviewer's GuideThis PR replaces the existing README documentation with a TypeScript authentication provider module, implementing core Refine auth methods and addressing an infinite-loop bug on session expiry. Sequence diagram for session expiry and authentication loop fixsequenceDiagram
participant Browser
participant "authProvider.onError()"
participant "authProvider.logout()"
participant "Refine Core"
Browser->>"Refine Core": Request restricted page
"Refine Core"->>"authProvider.checkAuth()": Check authentication
"authProvider.checkAuth()"-->>"Refine Core": authenticated: false, redirectTo: /login
"Refine Core"->>Browser: Redirect to /login
Note over "authProvider.onError()","authProvider.logout()": On 401/403 error
"Refine Core"->>"authProvider.onError()": Handle error
"authProvider.onError()"-->>"Refine Core": { logout: true }
"Refine Core"->>"authProvider.logout()": Logout
"authProvider.logout()"-->>"Refine Core": success, redirectTo: /login
"Refine Core"->>Browser: Redirect to /login
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Action: Go to your running Refine application (http://localhost:3000) and navigate to any Edit page.
Test: Slowly resize your browser window to simulate a mobile screen (make it very narrow).
Expected Result: The "Save" and "Delete" buttons in the footer should wrap neatly to a new line when space runs out, and both buttons should remain aligned to the right of the card footer.
Action: You need to trigger a session expiry or manually simulate an unauthorized state.
Test (Simulated):
Log in successfully.
Open your browser's Developer Tools → Application → Local Storage and delete the stored authToken (or whatever key you use).
Attempt to navigate to a restricted page or refresh the current page.
You should be redirected immediately to the /login page.
Expected Result: You should not see a flash of the main application or get stuck in a loop of redirects. The application should handle the session expiry cleanly and immediately land on the login screen.
Summary by Sourcery
Provide a sample refine authProvider implementation in place of the old README, including secure token storage, identity retrieval, and handling of expired sessions to prevent infinite redirects.
New Features:
Bug Fixes:
Documentation: